import request from '@/utils/request'

// 查询产品工艺用料列表
export function listProductTechMaterial(query) {
  return request({
    url: '/production/productTechMaterial/list',
    method: 'get',
    params: query
  })
}

// 查询产品工艺用料详细
export function getProductTechMaterial(productTechMaterialNo) {
  return request({
    url: '/production/productTechMaterial/' + productTechMaterialNo,
    method: 'get'
  })
}

// 新增产品工艺用料
export function addProductTechMaterial(data) {
  return request({
    url: '/production/productTechMaterial',
    method: 'post',
    data: data
  })
}

// 修改产品工艺用料
export function updateProductTechMaterial(data) {
  return request({
    url: '/production/productTechMaterial',
    method: 'put',
    data: data
  })
}

// 删除产品工艺用料
export function delProductTechMaterial(productTechMaterialNo) {
  return request({
    url: '/production/productTechMaterial/' + productTechMaterialNo,
    method: 'delete'
  })
}

// 导出产品工艺用料
export function exportProductTechMaterial(query) {
  return request({
    url: '/production/productTechMaterial/export',
    method: 'get',
    params: query
  })
}